// pages/set_log/set_logs.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    color:
    {
      on: "nine_svg_on",
      off: "nine_svg_off"
    },
    way:1,
    difficulty:1,
    nine: [
      {id: 0,select: true,text: "数字运算"},
      {id: 1,select: true,text: "字符找不同"},
      {id: 2,select: false,text: "舒尔特方格"},
      {id: 3,select: false,text: "数图形"},
      {id: 4,select: false,text: "读报"},
      {id: 5,select: false,text: "速算"},
      {id: 6,select: false,text: "连线"},
      {id: 7,select: false,text: "图片找不同"},
      {id: 8,select: false,text: "趣味音符"}
    ]
  },
  f1_1:function(){
    this.setData({ way: 1 });
  },
  f1_2: function () {
    this.setData({ way: 2 });
  },
  f2_1: function () {
    this.setData({ difficulty: 1 });
  },
  f2_2: function () {
    this.setData({ difficulty: 2 });
  },
  f2_3: function () {
    this.setData({ difficulty: 3 });
  },
  f3:function(e){
    var that = this;
    var id = e.currentTarget.dataset.id;
    if(id<2){
      var select = 'nine[' + id + '].select';
      that.setData({
        [select]: !that.data.nine[id].select
      });
    }else{
      this.notOpen();
    }
  },
  notOpen: function () {
    wx.showModal({
      title: '提示',
      content: '暂未开放,敬请期待！',
    })
  },
  back: function () {
    wx.navigateBack({

    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})